import MySQLdb

username = "' OR 1=1 #"
password = "pbkdf2_sha256$150000$jmgYQlLCrupF$+SdUAWPJk2+OyG9gL5JAZF8g/x65nCFYmmq35YsE7II="

conn = MySQLdb.connect(host="127.0.0.1", user="root", passwd="root", db="mxonline1", charset="utf8")
cursor = conn.cursor()
sql = "select * from users_userprofile where username='{}' and password='{}'".format(username,password)
cursor.execute(sql)
for row in cursor.fetchall():
    print(row)

